home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Build Support / **Instructions** next >
Encoding:
Text File  |  1995-08-21  |  4.2 KB  |  132 lines  |  [TEXT/MPS ]

  1. ============
  2. Instructions
  3. ============
  4.  
  5. The new build system fixes a couple short-comings of the older one. These are
  6. the hardcoded paths for the Rez build, the unpredictable -e build, and the 
  7. ability to add new compilers with minimal suffering.
  8.  
  9. In order to take advantage of the new build system, you will want to make 
  10. several changes to your makefile.
  11.  
  12. •1•
  13. Remove the dependency rules for the OpenDoc Utility files. Each utility
  14. implementation files has a default dependency rule which is included as
  15. part of a build.
  16.     
  17. •2•
  18. Change any hardcoded names in your root targets to {TargetName}.
  19.     ( not necessary for .exp files )
  20.  
  21. <before>
  22.     BUILDREZ ƒ ∂
  23.         "{ObjectsDir}SamplePart.PPC.rsrc"    ∂
  24.         "{ObjectsDir}SamplePart.68k.rsrc"
  25.  
  26. <after>
  27.     BUILDREZ ƒ ∂
  28.         "{ObjectsDir}{TargetName}.PPC.rsrc"    ∂
  29.         "{ObjectsDir}{TargetName}.68k.rsrc"
  30.  
  31. •3•
  32. Change "ILink" and "PPCLink", in you link build rules, to {LinkTool}.
  33.  
  34. The linker used for each compiler is now defined in the compiler variables
  35. files.
  36.  
  37. •4•
  38. Change "MakeSym" and "ILinkToSym", in you link build rules, to {SymTool}.
  39.  
  40. The symbol file tool used for each compiler is now defined in the compiler
  41. variables files.
  42.  
  43. •5•
  44. Change any hardcoded names in your link rules to {TargetName}.
  45.  
  46. <before>
  47.     Echo "include ∂"{RsrcObjectsDir}SamplePart.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  48.  
  49. <after>
  50.     Echo "include ∂"{RsrcObjectsDir}{TargetName}.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  51.  
  52. •6•
  53. Change all .rsrc files paths to use {RsrcObjectsDir} instead of {ObjectsDir}.
  54.  
  55. •7•
  56. Remove the {XCOFFRenameOptions} from your PPCLink line.
  57.  
  58. The build system automatically includes the rename options you need for the basic
  59. PPC libraries (including applescript and drag&drop, but not quicktime or gx).
  60.  
  61. •8•
  62. Remove the hardcoded PPC: and 68k: from the {ObjectsDir} paths in the Rez build steps.
  63. •9•
  64. Reorder the rez commands to behave better.
  65. •10•
  66. Use {Targ} instead of "{TargetDir}{TargetNamePPCLink}", where appropriate.
  67.  
  68. <before>
  69.     Echo Rezzing: PanelEditor.r (for PPC)
  70.     Rez {RezOptions} {ODRezIntf} "{SourceDir}"PanelEditor.r ∂
  71.          -a -o "{ObjectsDir}PPC:"PanelEditor.PPC.rsrc
  72.     Echo Copying: {TargetNamePPCLink}∂'s resources
  73.     Echo "include ∂"{ObjectsDir}PPC:PanelEditor.PPC.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  74.     Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  75.  
  76. <after>
  77.     Echo Rezzing: {TargetName}.r (for PPC)
  78.     Rez {RezOptions} {ODRezIntf} "{SourceDir}"SamplePart.r -o {targ}
  79.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  80.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  81.     if ( `exists "{TargetDir}{TargetNamePPCLink}" != ""` )
  82.         Echo Copying: {TargetNamePPCLink}∂'s resources
  83.         Echo "include ∂"{Targ}∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  84.     end    
  85.  
  86. The Rez output will be built into the root level of the objects folder since it is not
  87. compiler or language dependant.
  88.  
  89.  
  90. ==========
  91. What's New
  92. ==========
  93.  
  94. The new build system looks basically like the old one, except that -scpp, 
  95. -mrcpp, etc. has been replaced by the all-encompassing "-b" (build). The system
  96. is also, in essence, scriptable because it can run mulitple builds from a single
  97. command line.
  98.  
  99. In addition, the script has been renamed to more accurrately describe its single
  100. purpose in life, to build OpenDoc® parts.
  101.  
  102. Lastly, the -fat command is now only a method for merging previously built output.
  103. If the targets don't exists, -fat by itself, will not drive normal builds. (see
  104. example #3 below)
  105.  
  106. ===========
  107. What's Gone
  108. ===========
  109.  
  110. The -e command is no longer valid. To force a full rebuild of all targets 
  111. associated with a build, use -k (kill targets). The -k option is valid for the
  112. IDL and Rez builds, as well. (see example 2 below)
  113.  
  114.  
  115. ========
  116. Examples
  117. ========
  118.  
  119. <new command line syntax>
  120.  
  121. BuildOpenDocPart -b rez -f '8100:OpenDoc:SampleCode:SamplePart:SamplePart.make'
  122.     >> will perform a Rez build as needed.
  123.  
  124. BuildOpenDocPart -b idl,rez,scpp -k -f '8100:OpenDoc:SampleCode:SamplePart:SamplePart.make'
  125.     >> will perform a full IDL build, then a full Rez build, then a full SCpp build
  126.  
  127. BuildOpenDocPart -b scpp,mrcpp -fat -f '8100:OpenDoc:SampleCode:SamplePart:SamplePart.make'
  128.     >> will perform a SCpp build, as needed, then perform a MrCpp build, as needed,
  129.     >> then create a fat binary 
  130.  
  131.  
  132.